package com.qf.ts.platform.redis.util;

import com.qf.ts.platform.commons.constant.ExceptionDict;
import com.qf.ts.platform.redis.exception.CacheException;
import org.springframework.util.StringUtils;

/**
 * @Author: 一一哥
 * @Blame: yyg
 * @Since: Created in 2020/10/28
 * @Description: $cursor$
 */
public class RedisUtil {

    public static void chechKeyNull(String key) {
        if (StringUtils.isEmpty(key)) {
            //throw new RuntimeException();
            //throw new CacheException("key为空","-1");
            throw new CacheException(ExceptionDict.KEY_NULL_MSG, ExceptionDict.KEY_NULL_CODE);
        }
    }

}
